package ch.elektroplan.christian.projectFinder.presentation;

import java.io.File;
import java.util.ArrayList;

import javax.swing.JFrame;

import ch.elektroplan.christian.projectFinder.business.ProjectFinder;
import ch.elektroplan.christian.projectFinder.business.subs.ConfigfilePF;

public class SubFrames extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	protected void closeAndrewake(JFrame parent) {

		parent.setEnabled(true);
		this.dispose();
	}

	protected void save(ProjectFinder projectFinder,int xPos, int yPos) {
		
		ConfigfilePF temp = projectFinder.getConfigfilePF();
		
		temp.setxPos(xPos);
		temp.setyPos(yPos);
		
		projectFinder.getConfigFileSaver().saveConfigFile();

	}

	protected void save(ProjectFinder projectFinder, ArrayList<File> searchDirectories) {

		ConfigfilePF temp = projectFinder.getConfigfilePF();
		
		temp.setSearchDirectories(searchDirectories);		
		
		projectFinder.getConfigFileSaver().saveConfigFile();

	}

	
}
